﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PaymentListForm.ascx.cs"
    Inherits="SalesManagement.Controls.List.PaymentListForm" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Window ID="winDetails" runat="server" Title="Phiếu chi" Icon="PageForward" Width="900"
    Height="900" Modal="true" Hidden="true" Layout="FormLayout" Padding="5">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" BodyBorder="false" MonitorPoll="500"
            MonitorValid="true" Padding="5" Width="900" Height="500" ButtonAlign="Right">
            <Items>
                <ext:FieldSet ID="FieldSet1" runat="server" Title="Thông tin phiếu" AutoHeight="true"
                    LabelWidth="75" Layout="Form" Padding="5" Frame="true">
                    <Items>
                        <ext:CompositeField ID="CompositeField1" FieldLabel="Số phiếu" runat="server" MsgTarget="Under"
                            AnchorHorizontal="-20">
                            <Items>
                                <ext:TextField ID="txtBondNo" runat="server" Width="100" />
                                <ext:DisplayField ID="DisplayField2" runat="server" Text="Ngày (*)" />
                                <ext:DateField ID="dateIn" runat="server" Width="100" />
                                <ext:DisplayField ID="DisplayField3" runat="server" Text="Số hóa đơn" />
                                <ext:TextField ID="txtBillNo" runat="server" Width="100" />
                                <ext:DisplayField ID="DisplayField4" runat="server" Text="Chứng từ" />
                                <ext:TextField ID="txtVoucher" runat="server" Width="100" />
                            </Items>
                        </ext:CompositeField>
                        <ext:CompositeField ID="CompositeField2" FieldLabel="Chứng từ nhập" runat="server"
                            MsgTarget="Under" AnchorHorizontal="-20">
                            <Items>
                                <ext:ComboBox ID="cbInputMethod" runat="server" Width="250" Editable="false" DataIndex="Title" />
                                <ext:DisplayField ID="DisplayField6" runat="server" Text="Nhân viên" />
                                <ext:ComboBox ID="cbEmployee" runat="server" Width="230" Editable="false" DataIndex="Title">
                                    <Items>
                                        <ext:ListItem Text="Nguyễn Văn A" Value="hcm" />
                                        <ext:ListItem Text="Nguyễn Văn B" Value="hn" />
                                    </Items>
                                    <SelectedItem Value="hcm" />
                                </ext:ComboBox>
                            </Items>
                        </ext:CompositeField>
                        <ext:ComboBox ID="cbSuppliers" FieldLabel="Nhà cung cấp" runat="server" Width="300"
                            Editable="false" DataIndex="Title" />
                        <ext:CompositeField ID="CompositeField5" FieldLabel="Địa chỉ" runat="server" MsgTarget="Under"
                            AnchorHorizontal="-20">
                            <Items>
                                <ext:TextField ID="txtAddress" runat="server" Width="300" />
                                <ext:DisplayField ID="DisplayField8" runat="server" Text="MST" />
                                <ext:TextField ID="txtMST" runat="server" Width="100" />
                            </Items>
                        </ext:CompositeField>
                        <ext:ComboBox ID="cbTimePay" FieldLabel="Kho xuất" runat="server" Width="200" Editable="false"
                            DataIndex="Title">
                            <Items>
                                <ext:ListItem Text="Kho A" Value="hcm" />
                                <ext:ListItem Text="Kho B" Value="hn" />
                            </Items>
                            <SelectedItem Value="hcm" />
                        </ext:ComboBox>
                    </Items>
                </ext:FieldSet>
                <ext:GridPanel ID="GridPanel2" runat="server" AutoExpandColumn="pro_Name" Border="false"
                    Height="250" Frame="true">
                    <Store>
                        <ext:Store ID="Store2" runat="server">
                            <Reader>
                                <ext:JsonReader IDProperty="pro_id">
                                    <Fields>
                                        <ext:RecordField Name="pro_id" />
                                        <ext:RecordField Name="pro_Name" />
                                        <ext:RecordField Name="pro_Unit" />
                                        <ext:RecordField Name="pro_Amount" />
                                        <ext:RecordField Name="pro_Price" />
                                        <ext:RecordField Name="pro_VAT" />
                                        <ext:RecordField Name="pro_Acounting" />
                                        <ext:RecordField Name="pro_Total" />
                                    </Fields>
                                </ext:JsonReader>
                            </Reader>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel2" runat="server">
                        <Columns>
                            <ext:Column ColumnID="pro_id" DataIndex="pro_id" Header="Mã hàng" />
                            <ext:Column DataIndex="pro_Name" Header="Tên hàng" />
                            <ext:Column DataIndex="pro_Unit" Header="Đơn vị tính" />
                            <ext:Column DataIndex="pro_Amount" Header="Số lượng" />
                            <ext:Column DataIndex="pro_Price" Header="Đơn giá" />
                            <ext:Column DataIndex="pro_VAT" Header="VAT" />
                            <ext:Column DataIndex="pro_Acounting" Header="Chiết khấu" />
                            <ext:Column DataIndex="pro_Total" Header="Thành tiền" />
                        </Columns>
                    </ColumnModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolBar2" runat="server" PageSize="10" />
                    </BottomBar>
                    <LoadMask ShowMask="true" />
                </ext:GridPanel>
            </Items>
        </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="btnSave" runat="server" Text="Save" Icon="Disk">
            <DirectEvents>
                <Click OnEvent="btnSave_Click" />
            </DirectEvents>
        </ext:Button>
        <ext:Button ID="btnCancel" runat="server" Text="Cancel" Icon="Cancel">
            <Listeners>
                <Click Handler="#{winDetails}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>
